AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include("shared.lua")

function ENT:Initialize()
	self:SetModel("models/props_building_details/Storefront_Template001a_Bars.mdl")
	self:PhysicsInit(SOLID_VPHYSICS)
	self:SetMoveType(MOVETYPE_FLY)
	self:SetSolid(SOLID_VPHYSICS)
	local phys = self:GetPhysicsObject()
	if phys:IsValid() then phys:Wake() end
	self:SetUseType(SIMPLE_USE)
end
function ENT:KeyValue( key, value )
	if key == "model" then
		self:ChangeModel(value)
	end
end
function ENT:ChangeModel(Model)
	print("model chaged to ".. Model)
	self:SetModel(Model)
	self:PhysicsInit( SOLID_VPHYSICS )
	self:SetMoveType( MOVETYPE_FLY )
end

function ENT:RemovePhysics(sbool)
	if sbool == "true" then
		self:PhysicsInit( SOLID_NONE )
		self:SetMoveType(MOVETYPE_NONE)
	end
end

function ENT:Use( activator, caller )
	activator:ChangeTeam()
end